package com.photography.controller;

import com.photography.pojo.Employee;
import com.photography.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/employee")
public class EmployeeController {

    @Autowired
    private EmployeeService employeeService;
//
//    @GetMapping
//    public PageResult<Employee> findAll(@RequestParam int page,@RequestParam int rows){
//
//        return employeeService.findAll(page,rows);
//    }
//
//    @GetMapping("{id}")
//    public Result findById(@PathVariable String id){
//        Employee employee = employeeService.findById(id);
//        return new Result(true, StatusCode.OK,"查询成功",employee);
//    }
//
//    @PostMapping
//    public Result addEmployee(Employee employee){
//        employeeService.addEmployee(employee);
//        return Result.ok();
//    }
//
//    @RequestMapping("updatestatus")
//    public Result updateStatusEmployee(@RequestParam String[] ids,@RequestParam int status){
//        employeeService.updateStatusEmployee(ids,status);
//        return Result.ok();
//    }
//
//   @RequestMapping("update")
//    public Result updateEmployee(Employee employee){
//        employeeService.updateEmployee(employee);
//        return Result.ok();
//    }
}
